]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Clear the pointer left timeout when showing a notification
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 2 Jun 2014 17:28:18 +0000 (13:28 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 2 Jun 2014 21:39:52 +0000 (17:39 -0400)
When the pointer leaves the notification area, we queue a timeout to
hide the notification after a little while. If the user is hovering over
a notification and clicks the X button to close the notification, we will
destroy the notification, which causes a "pointer left" event on the
notification area. This queues a timeout which erroneously fires after
the next notification in the queue shows up.

The code and state machine are too complex to properly make sure this
timeout doesn't fire when there is no notification up next, so instead
just clear it when showing a notification to make sure that any
previously queued timeout doesn't apply to us.

https://bugzilla.gnome.org/show_bug.cgi?id=731118

js/ui/messageTray.js

index 971c451a98719965e092df7b2fb65c24eed4da91..d7d09814227d9c1674fcc7a75d4196dceb2ac260 100644 (file)
@@ -2631,6 +2631,8 @@ const MessageTray = new Lang.Class({
         // the mouse is moving towards it or within it.
         this._lastSeenMouseX = x;
         this._lastSeenMouseY = y;
+
+        this._resetNotificationLeftTimeout();
     },
 
     _updateShowingNotification: function() {